package com.bazooka.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.ggsound.bluetoothbox.cache.db.entity.FmChannelCache;
import com.ggsound.bluetoothbox.cache.db.entity.LedFlash;
import com.ggsound.bluetoothbox.cache.db.entity.SendSuccessFlash;
import com.ggsound.bluetoothbox.cache.db.entity.LedFlashInfo;
import com.ggsound.bluetoothbox.cache.db.entity.SelectedColor;

import com.bazooka.greendao.gen.FmChannelCacheDao;
import com.bazooka.greendao.gen.LedFlashDao;
import com.bazooka.greendao.gen.SendSuccessFlashDao;
import com.bazooka.greendao.gen.LedFlashInfoDao;
import com.bazooka.greendao.gen.SelectedColorDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig fmChannelCacheDaoConfig;
    private final DaoConfig ledFlashDaoConfig;
    private final DaoConfig sendSuccessFlashDaoConfig;
    private final DaoConfig ledFlashInfoDaoConfig;
    private final DaoConfig selectedColorDaoConfig;

    private final FmChannelCacheDao fmChannelCacheDao;
    private final LedFlashDao ledFlashDao;
    private final SendSuccessFlashDao sendSuccessFlashDao;
    private final LedFlashInfoDao ledFlashInfoDao;
    private final SelectedColorDao selectedColorDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        fmChannelCacheDaoConfig = daoConfigMap.get(FmChannelCacheDao.class).clone();
        fmChannelCacheDaoConfig.initIdentityScope(type);

        ledFlashDaoConfig = daoConfigMap.get(LedFlashDao.class).clone();
        ledFlashDaoConfig.initIdentityScope(type);

        sendSuccessFlashDaoConfig = daoConfigMap.get(SendSuccessFlashDao.class).clone();
        sendSuccessFlashDaoConfig.initIdentityScope(type);

        ledFlashInfoDaoConfig = daoConfigMap.get(LedFlashInfoDao.class).clone();
        ledFlashInfoDaoConfig.initIdentityScope(type);

        selectedColorDaoConfig = daoConfigMap.get(SelectedColorDao.class).clone();
        selectedColorDaoConfig.initIdentityScope(type);

        fmChannelCacheDao = new FmChannelCacheDao(fmChannelCacheDaoConfig, this);
        ledFlashDao = new LedFlashDao(ledFlashDaoConfig, this);
        sendSuccessFlashDao = new SendSuccessFlashDao(sendSuccessFlashDaoConfig, this);
        ledFlashInfoDao = new LedFlashInfoDao(ledFlashInfoDaoConfig, this);
        selectedColorDao = new SelectedColorDao(selectedColorDaoConfig, this);

        registerDao(FmChannelCache.class, fmChannelCacheDao);
        registerDao(LedFlash.class, ledFlashDao);
        registerDao(SendSuccessFlash.class, sendSuccessFlashDao);
        registerDao(LedFlashInfo.class, ledFlashInfoDao);
        registerDao(SelectedColor.class, selectedColorDao);
    }
    
    public void clear() {
        fmChannelCacheDaoConfig.clearIdentityScope();
        ledFlashDaoConfig.clearIdentityScope();
        sendSuccessFlashDaoConfig.clearIdentityScope();
        ledFlashInfoDaoConfig.clearIdentityScope();
        selectedColorDaoConfig.clearIdentityScope();
    }

    public FmChannelCacheDao getFmChannelCacheDao() {
        return fmChannelCacheDao;
    }

    public LedFlashDao getLedFlashDao() {
        return ledFlashDao;
    }

    public SendSuccessFlashDao getSendSuccessFlashDao() {
        return sendSuccessFlashDao;
    }

    public LedFlashInfoDao getLedFlashInfoDao() {
        return ledFlashInfoDao;
    }

    public SelectedColorDao getSelectedColorDao() {
        return selectedColorDao;
    }

}
